import React, { Component } from 'react';
import {StyleSheet,View} from 'react-native';
import { Number } from 'iftide';

export default class Basic extends Component {
   
    operate() {
        console.log('operate Press!');
    }
    
    render() {
        const imgOne = [require('./Icon.png')];
        const imgtmp = [require('./Icon.png'), require('./Icon.png')];
        return (
            <View style={styles.container}>
                <Number
                inputType='creditCard'
                inputTextStyles={{ color: 'blue' }}
                showClearIcon={true}
                maxLength={16}
                showErrorInfo={true}
                info={'这是错误信息'}
                />
                <Number
                inputType='debitCard'
                placeHolder='8888 8888 8888 8888'
                showClearIcon={false}
                rightIcon={imgtmp}
                titleIconFunc={()=>{alert(1)}}
                titleIcon={require('./sicon.png')}
                />
                <Number
                inputType='mobilePhone'
                placeHolder='188 8888 8888'
                showClearIcon={true}
                onFocus={()=>this.operate()}
                showErrorInfo={true}
                />
                <Number
                inputType='telePhone'
                rightIcon={imgOne}
                showClearIcon={true}
                />
                <Number
                maxLength={10}
                />
            </View>
        );
    }


}

const styles = StyleSheet.create({
    container: {
        //flex: 1,
        flexDirection: "column",
      },
})
